package com.gkd.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.gkd.pojo.entity.Likes;

/**
* @author ZJF
* @description 针对表【like】的数据库操作Service
* @createDate 2024-06-15 18:18:34
*/
public interface LikesService extends IService<Likes> {

    /**
     * 添加点赞
     * @param postId
     */
    void add(Integer postId);

    /**
     * 取消点赞
     * @param postId
     */
    void delete(Integer postId);

    /**
     * 通过文章id和用户id获取点赞状态
     * @param postId
     * @param userId
     * @return
     */
    String getByPostIdAndUserId(Integer postId, Integer userId);
}
